/*
 * =====================================================================================
 *
 *       Filename:  controller.cpp
 *
 *    Description:  controller for this application , MVC
 *
 *        Version:  1.0
 *        Created:  Saturday 27 November 2010 10:56:53  IST
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  shashank singh,
 *        Company:  awaaz.me
 *
 * =====================================================================================
 */

#include "controller.h"

controller::controller()
{
timer=new QTimer;
QObject::connect(&physics,SIGNAL(move(int,int)),&view,SLOT(translate(int,int)));
QObject::connect(timer,SIGNAL(timeout()),&physics,SLOT(simulate()));
}


void controller::run()
{
view.show();
timer->start(100);
}

void controller::stop()
{
timer->stop();
}
